﻿using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

namespace StarsAdmin.Web.Core.Extensions
{
    /// <summary>
    /// log4net服务
    /// </summary>
    public static class LoggingExtension
    {
        public static void AddLoggingConfig(this IServiceCollection services)
        {
            services.AddLogging(options =>
            {
                options.AddLog4Net(new Log4NetProviderOptions() { Log4NetConfigFileName = "Log4net.config", Watch = true });
            });
        }
    }
}